package com.ims.core.doc.service.impl;

import java.util.List;
import com.ims.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ims.core.doc.mapper.TInDeductionStatEntryMapper;
import com.ims.core.doc.domain.TInDeductionStatEntry;
import com.ims.core.doc.service.ITInDeductionStatEntryService;

/**
 * 抵扣统计明细Service业务层处理
 *
 * @author IMS
 * @date 2024-12-11
 */
@Service
public class TInDeductionStatEntryServiceImpl implements ITInDeductionStatEntryService
{
    @Autowired
    private TInDeductionStatEntryMapper tInDeductionStatEntryMapper;

    /**
     * 查询抵扣统计明细
     *
     * @param id 抵扣统计明细主键
     * @return 抵扣统计明细
     */
    @Override
    public TInDeductionStatEntry selectTInDeductionStatEntryById(Long id)
    {
        return tInDeductionStatEntryMapper.selectTInDeductionStatEntryById(id);
    }

    /**
     * 查询抵扣统计明细列表
     *
     * @param tInDeductionStatEntry 抵扣统计明细
     * @return 抵扣统计明细
     */
    @Override
    public List<TInDeductionStatEntry> selectTInDeductionStatEntryList(TInDeductionStatEntry tInDeductionStatEntry)
    {
        return tInDeductionStatEntryMapper.selectTInDeductionStatEntryList(tInDeductionStatEntry);
    }

    /**
     * 新增抵扣统计明细
     *
     * @param tInDeductionStatEntry 抵扣统计明细
     * @return 结果
     */
    @Override
    public int insertTInDeductionStatEntry(TInDeductionStatEntry tInDeductionStatEntry)
    {
        tInDeductionStatEntry.setCreateTime(DateUtils.getNowDate());
        return tInDeductionStatEntryMapper.insertTInDeductionStatEntry(tInDeductionStatEntry);
    }

    /**
     * 修改抵扣统计明细
     *
     * @param tInDeductionStatEntry 抵扣统计明细
     * @return 结果
     */
    @Override
    public int updateTInDeductionStatEntry(TInDeductionStatEntry tInDeductionStatEntry)
    {
        tInDeductionStatEntry.setUpdateTime(DateUtils.getNowDate());
        return tInDeductionStatEntryMapper.updateTInDeductionStatEntry(tInDeductionStatEntry);
    }

    /**
     * 批量删除抵扣统计明细
     *
     * @param ids 需要删除的抵扣统计明细主键
     * @return 结果
     */
    @Override
    public int deleteTInDeductionStatEntryByIds(Long[] ids)
    {
        return tInDeductionStatEntryMapper.deleteTInDeductionStatEntryByIds(ids);
    }

    /**
     * 删除抵扣统计明细信息
     *
     * @param id 抵扣统计明细主键
     * @return 结果
     */
    @Override
    public int deleteTInDeductionStatEntryById(Long id)
    {
        return tInDeductionStatEntryMapper.deleteTInDeductionStatEntryById(id);
    }
}
